﻿@using QqhrCitizen.Models;
@using QqhrCitizen.Models.ViewModel;
@{
    ViewBag.Title = "电子书首页_齐齐哈尔市民学习网";
    EBook ebook = ViewBag.EBooks;
}
<script>
    $("#topmenu_ebook").attr("class", "item_selected");
</script>
<div id="d_menu" class="d-menu menu-bok">
    <div id="d_menu_c" class="d-menu-c">
        <!-- region start: menu -->
        <div id="d_headmenu" class="d-headmenu">
            <div class="body">
                <a class="item_selected" href="/EBook/Index" id="headmenu_default">电子书首页</a>
                <a class="item" href="/EBook/Discovery/0" id="headmenu_discovery">发现电子书</a>
            </div>
        </div><!-- region end: menu -->
    </div>
</div>
<div id="d_bottom" class="d-bottom" style="visibility: hidden; position: relative;">
    <div class="d-bottom-c">
        <div id="d_scrolltop" class="d-scrolltop" style="right: -70px;">
            <span class="t" onclick="$('html,body').animate({scrollTop: '0px'}, 800);">顶部</span>
        </div>
    </div>
</div>
<div class="d-row">
    <div class="d-row-c">
        <div class="d-col-2-8">
            <div class="contentarea">
                <!-- region start: 热门电子书 -->
                <div id="d_bookhot" class="d-bookhot">
                    <div class="head">
                        热门电子书
                    </div>
                    <div class="body">
                        <div id="slide_bookhot" class="slidecontainer">
                            @foreach (var item in ViewBag.HotBooks as List<EBook>)
                            {
                                <div class="item">
                                    <a class="cover" href="/EBook/Show/@item.ID" target="_blank">
                                        <img style="width:110px;height:164px;" src="/EBook/ShowPicture/@item.ID" />
                                    </a>
                                    <div class="title trim">
                                        <a href="/EBook/Show/@item.ID" title="@item.Title" target="_blank">@item.Title</a>
                                    </div>
                                    <div class="author trim" title="">@item.Author</div>
                                </div>
                            }
                        </div>
                    </div>
                </div>
                <!-- region start: 电子书推荐 -->
                <hr style="border: none; height: 1px; background-color: #ccc; margin: 20px 25px 0 0;">
                <div id="d_booknew" class="d-booknew">
                    <div class="head">
                        电子书推荐
                    </div>
                    <div class="body">
                        <div id="slide_booknew" class="slidecontainer">
                            @foreach (var item in ViewBag.NewBooks as List<EBook>)
                            {
                                <div class="item">
                                    <div class="title trim">
                                        <a href="/EBook/Show/@item.ID" title="@item.Title" target="_blank">@item.Title</a>
                                    </div>
                                    <div title="@item.Author" class="author trim">作者：@item.Author</div>
                                    <div class="classification  trim" title="@item.TypeDictionary.TypeValue">@item.TypeDictionary.TypeValue</div>
                                    <div class="type">&nbsp;</div>
                                    <a class="cover" href="/EBook/Show/@item" target="_blank">
                                        <img src="/Ebook/ShowPicture/@item.ID" style="width:68px;height:96px;" />
                                    </a>
                                </div>
                            }
                        </div>
                    </div>
                </div>
                <!-- region end: 电子书推荐 -->
            </div>
        </div>
        <div class="d-col-2-4">
            <div class="contentarea" style="padding: 0px 0 30px 0;">
                <!-- region start: 热门分类 -->
                <div id="d_coursehotcategory" class="d-coursehotcategory">
                    <div class="head">
                        热门分类
                        <a href="/EBook/Discovery/0">浏览更多&nbsp;&gt;&gt;</a>
                    </div>
                    <div class="body">
                        @foreach (var item in ViewBag.LstHotType as List<TypeDictionary>)
                        {
                            <a class="item" href="/EBook/Discovery/@item.ID" title="@item.TypeValue">@item.TypeValue</a>
                        }
                    </div>

                </div>
                <!-- region start: 读者动态 -->
                <div id="d_bookactivity" class="d-bookactivity">
                    <div class="head">读者动态</div>
                    <div class="body">
                        <div id="feed_bookactivity" class="feedcontainer" style="top: 0px;">
                            @foreach (var item in ViewBag.LstRecord as List<vReadRecord>)
                            {
                                <div class="item">
                                    <div class="name trim">
                                        <a href="#" title="@item.User.Username">@item.User.Username</a>
                                    </div>
                                    <div class="trends trim">@item.Time 阅读了</div>
                                    <div class="book trim">
                                        <a href="/EBook/Show/@item.EBookID" title="@item.EBook.Title" target="_blank">
                                            @item.EBook.Title
                                        </a>
                                    </div>
                                    <a class="avatar" href="#">
                                        @if (item.User.Picture != null)
                                        {
                                            <img src="/User/ShowPicture/@item.UserID" style="width:48px;height:48px;">
                                        }
                                        else
                                        {
                                            <img src="~/Images/userphoto.png" style="width:48px;height:48px;">
                                        }
                                    </a>
                                </div>
                            }
                        </div>
                    </div>
                </div>
                <!-- region end: 读者动态 -->
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>